<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title></title>
</head>
<style>
.box{
        margin: 20px 20px;
        width: 500px;
        height: 400px;

    }
.frame{
    padding: 10px 0;
}
.frame input[type="text"]{
    width: 300px;
    padding: 5px;
    height: 35px;
    outline: 0;
    border: 1px solid #C5C5C5;
}
.frame select{
    width: 300px;
    padding: 5px;
    outline: 0;
    height: 35px;
    border: 1px solid #c5c5c5;
}
label{
    display: block;
}
    .divBtn{
        margin: 10px 0;
        padding: 0;
        width: 60%;
        text-align: right;
    }
    input.reset,input.query{
        border: 0;
        color: #fff;
        padding: 7px 20px;
        outline: 0;
    }
input.reset{
    background-color: #ed9c28;
}
input.query{
    background-color: #009fcd;
}
</style>
<body>
<div class="box">
        <div class="frame">
            <label>设备地址</label>
            <input type="text" placeholder="请输入16位设备地址"  id="address"/>
        </div>
    <div class="frame">
        <label>服务器端口号</label>
        <input type="text" placeholder="请输入服务器端口号" id="port" />
    </div>
        <div class="divBtn">
            <input type="button" name="" value="重置" class="reset" id="reset" data-dismiss="modal"/>
            <input type="button" name="" value="查询" class="query" id="query"/>
        </div>
</div>
</body>
<script>
$('#query').on('click', function() {
        if(!!$("#address").val() && !!$("#port").val()){
           $.ajax({
           type : 'post',
           url : '',
           data : {},
           dataType : 'json',
           success : function(data) {

           },
           error: function(){
               bootboxWindow.alert("指令下发失败!", null);
           }
       });
        }else{
            alert("验证不给过")
        }
   });
    $(function(){
        $('#reset').on('click',function(){
            var address_value = $('#address').val();
            if(address_value !== ""){
                $('#address').val("");
            }
        })
    })
</script>
</html>